package com.sc.auction.common.config;

import com.sc.auction.common.interceptor.JWTInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JWTInterceptor());
//                .addPathPatterns("/**")  //拦截
//                .excludePathPatterns("/user/itrip-user/login","/upcomingAuction"); //放行
    }
}